<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function getYear(year) {
            var flag = false;
            if (year % 4 == 0 && year % 400 != 0 || year % 400 == 0) {
                flag = true;
            } else {
                return flag;
            }
        }

        alert(getYear(2000));
    </script>
</head>
<body>

</body>
</html>